import http from '@/utils/http'

const baseURL = '/v1.0'

/**
 * 获取资源
 * @param {Object} query 搜索关键字；pagenum 当前的页数；pagesize 每页显示的条数
 */
export const getResource = (params) => {
  return http.get(`${baseURL}/public/search`, params)
}

/**
 * 编辑资源
 * @param {int} Id-资源id
 */
export const EditResource = (Id, editResourceForm) => {
  return http.put(`${baseURL}/public/resource/${Id}`, editResourceForm)
}
export const uploadResource = (params) => {
  return http.file(`${baseURL}/public/resource/upload`, params)
}
